﻿<UserControl x:Class="ContactTracing.CaseView.Controls.StatusSelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:p="clr-namespace:ContactTracing.CaseView.Properties"
             xmlns:own="clr-namespace:ContactTracing.CaseView"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" Loaded="UserControl_Loaded" DataContextChanged="UserControl_DataContextChanged">
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="bvc"/>
        <Style TargetType="{x:Type CheckBox}">
            <Style.Triggers>
                <DataTrigger
                        Binding="{Binding
                            RelativeSource={RelativeSource
                                Mode=FindAncestor,
                                AncestorType={x:Type DataGridCell}},
                                Path=IsSelected}"
                        Value="True">
                    <Setter Property="Foreground" Value="White"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>
    <Grid>
        <StackPanel Orientation="Horizontal" x:Name="panelMain">
            <StackPanel Orientation="Horizontal" x:Name="panelSelectors">
                <CheckBox x:Name="chkbx1" Margin="0, 0, 7, 0" Click="CheckBox_Click" Checked="chkbx1_Checked" Unchecked="chkbx1_Unchecked" >√</CheckBox>
                <CheckBox x:Name="chkbx2" Margin="0, 0, 7, 0" Click="CheckBox_Click" Checked="chkbx2_Checked" Unchecked="chkbx2_Unchecked" >X</CheckBox>
                <CheckBox x:Name="chkbx3" Margin="0, 0, 7, 0" Click="CheckBox_Click" Checked="chkbx3_Checked" Unchecked="chkbx3_Unchecked" >-</CheckBox>
                <CheckBox x:Name="chkbx4" Margin="0, 0, 7, 0" Click="CheckBox_Click" Checked="chkbx4_Checked" Unchecked="chkbx4_Unchecked" >NR</CheckBox>
                <CheckBox x:Name="chkbxN" Margin="0, 0, 7, 0" Click="CheckBox_Click" Checked="chkbxN_Checked" Unchecked="chkbxN_Unchecked" Visibility="Collapsed" >NULL</CheckBox>
            </StackPanel>
            <StackPanel Width="20" Visibility="{Binding ElementName=chkbx2, Path=IsChecked, Converter={StaticResource bvc}}" />
            <StackPanel Orientation="Horizontal" x:Name="panelYN" Visibility="{Binding ElementName=chkbx2, Path=IsChecked, Converter={StaticResource bvc}}">
                <TextBlock Margin="0, 0, 8, 0" Text="{x:Static p:Resources.StatusIsolated}" />
                <CheckBox x:Name="chkbx5" Margin="0, 0, 7, 0" Checked="chkbx5_Checked" Unchecked="chkbx5_Unchecked" Content="{x:Static p:Resources.Yes}" />
                <CheckBox x:Name="chkbx6" Margin="0, 0, 7, 0" Checked="chkbx6_Checked" Unchecked="chkbx6_Unchecked" Content="{x:Static p:Resources.No}" />
                <CheckBox x:Name="chkbx7" Margin="0, 0, 7, 0" Checked="chkbx7_Checked" Unchecked="chkbx7_Unchecked" Visibility="Collapsed" >NULL</CheckBox>
            </StackPanel>
            <!--<CheckBox IsChecked="{Binding IsNotSeen, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" x:Name="chkbx5" Margin="0, 0, 7, 0" Click="CheckBox_Click">X</CheckBox>
            <CheckBox IsChecked="{Binding IsSeenUnknown, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" x:Name="chkbx6" Margin="0, 0, 2, 0" Click="CheckBox_Click" Checked="CheckBox_Checked">-</CheckBox>-->
        </StackPanel>
    </Grid>
</UserControl>
